package cn.enjoy.controller;

import cn.enjoy.entity.User;
import cn.enjoy.service.IUserService;
import cn.enjoy.tool.api.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author K
 * @date 2020/12/4 10:56
 */
@RestController
@AllArgsConstructor
public class AspectController {

    private IUserService userService;

    @GetMapping("/user/findAll")
    public void findAll() {
        userService.findAll();
    }

    @PostMapping("time")
    public R timeTest(@RequestBody User user) {
        return R.data(user);
    }

    @PostMapping("/logSpel")
    public void logSpel(@RequestBody User user) {
        userService.logSpel(user);
    }

}
